﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
<style>
    th{
        text-align:center;
    }
    td{
        width:250px;
        text-align:center;
    }
</style>
    <asp:Button ID = "add" runat="server" OnClick="add_Click" Text="添加"/> 
    <asp:GridView ID = "ggb" runat="server" AutoGenerateColumns="false" 
        OnRowDeleting="ggb_RowDeleting" OnRowCancelingEdit="ggb_RowCancelingEdit" OnRowUpdating="ggb_RowUpdating" OnRowEditing="ggb_RowEditing" >
        <Columns>
            <asp:BoundField HeaderText = "Id" DataField="Id" ReadOnly="true" />
            <asp:BoundField HeaderText = "标题" DataField="Title" />
            <asp:BoundField HeaderText = "内容" DataField="Content" />
            <asp:BoundField HeaderText = "作者" DataField="Author" />
            <asp:BoundField HeaderText = "备注" DataField="Remarks" />
            <asp:CommandField HeaderText = "高端操作" ShowDeleteButton="True" ShowEditButton="True" ShowHeader="True" />
        </Columns>
    </asp:GridView>
               
</asp:Content>
